<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Address extends Model
{
    protected $fillable = [
        'user_id', 'company_id', 'address',
    ];
    public static $rules = [
        'address' => 'required|max:20|unique:addresses',
    ];
    public static $message = [
        'address.required' => '公司地点必须填写',
        'address.max' => '公司地点最多20个字符',
        'address.unique' => '公司地点不能重复',
    ];
    protected function getDateFormat()
    {
        return time();
    }
}
